<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>0419</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- 循环对象，value代表字段值 -->
        <ul>
            <li v-for="value in user">
                {{value}}
            </li>
        </ul>
        <!-- 循环对象， 字段值，字段， 字段索引 -->
        <ul v-for="(value, key , idx) in user">
            <li>
                {{idx}}: {{key}}={{value}}
            </li>
        </ul>
    </div>

    <script>
        var vm = new Vue({
            el: "#app",
            data:{
                user:{
                    id: 1,
                    name: "zhangmeng",
                    age: 69,
                    male: true
                }
            }
        })
    </script>
</body>
</html>